home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / ip / dns / dnsparse-2.0 / dnstest < prev    next >
Encoding:
Text File  |  1990-09-11  |  973 b   |  32 lines

  1. #!/usr/bin/perl
  2. #
  3. # $Id: dnstest,v 2.0 90/09/11 11:07:39 hakanson Rel $
  4. #
  5. # Test program used for exercising dnsparse.pl subroutines.
  6. #   Marion Hakanson (hakanson@cse.ogi.edu)
  7. #   Oregon Graduate Institute of Science and Technology
  8. #
  9. # Copyright (c) 1990, Marion Hakanson.
  10. #
  11. # You may distribute under the terms of the GNU General Public License
  12. # as specified in the README file that comes with the dnsparse kit.
  13. #
  14. # This program is useful for printing out DNS master files in
  15. # their canonical (fully-qualified) form, and for doing a simple
  16. # scan for some syntax errors.  It's also an example skeleton for
  17. # other programs which want to use the dnsparse routines.
  18.  
  19. do "dnsparse.pl";
  20.  
  21.  
  22. do dns_init(@ARGV);
  23.  
  24. print "\$ORIGIN .\n";    # in case our output gets fed to a nameserver
  25.  
  26. $" = ' ';    # output separator between array elements
  27.  
  28. while ( (@rr = do dns_getrr()) && @rr ) {
  29.     ($domain, $ttl, $class, $type, @data) = @rr; 
  30.     print "$domain $ttl $class $type @data\n";
  31. }
  32.